// D3D10Scene.h

#pragma once

#include <windows.h>

// C RunTime Header Files
#include <stdlib.h>
#include <stdio.h>
#include "D3D11.h"

#include "RBMain/RBCommon.h"
#include "RBMain/RBHandle.h"


class RBRenderTargetGroup;
class RBRenderPassFullScreen;
class RBTexture;

class RBCamera;

struct IDirect3D9Ex;
struct IDirect3DDevice9Ex;

struct rb_private_members;

class gi_sample
{
public:

    gi_sample(void* hWnd, int width, int height);
    void ChangeSize(int width, int height);

    void Render();
	void Release();
    void AddFile(const char* filename);

    void create_gi();

    int get_visible_pixels();

private:
	UINT WIDTH;
	UINT HEIGHT;

	void init_gi();

    void render_gi(RBCamera* camera);

    struct ID3D11Texture2D*			m_textureGI;
    RBTexture*			            m_textureGI_cpu;
    RBTexture*			            m_textureGI_sh_cube;
    RBTexture*			            m_textureGI_sh_cpu_output;
    RBRenderTargetGroup*            m_gi_target;
    RBRenderTargetGroup*            m_gi_target_rgb8;
    RBRenderPassFullScreen*         m_fullscreen;
	IDirect3DDevice9Ex*				m_device;
    rb_private_members*             m_private_members;
    int                             pixels_visible;
};
